FROM centos:7

MAINTAINER laughstorm <laughstorm@foxmail.com>

USER root

ENV JAVA_HOME=/usr/lib/jvm/java-openjdk

ENV PATH=$PATH:$JAVA_HOME/bin:.

# 配置为阿里镜像源
RUN wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

# 设置缓存
RUN yum makecache

# 安装 OpenJDK
RUN yum update -y && \
    yum install -y java-1.8.0-openjdk-devel && \
    yum clean all && \
    cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

CMD ["/bin/bash"]